#include "BulletCollision/Gimpact/btGImpactQuantizedBvh.h"
#ifdef __cplusplus
extern "C" {
#endif
btQuantizedBvhTree* bullet_NewbtQuantizedBvhTree(){
	btQuantizedBvhTree* wrap_out = new btQuantizedBvhTree();
	return wrap_out;
}

void bullet_btQuantizedBvhTree_clearNodes(btQuantizedBvhTree* c_this){
	c_this->clearNodes();
}

BT_QUANTIZED_BVH_NODE* bullet_btQuantizedBvhTree_get_node_pointer(btQuantizedBvhTree* c_this,int index){
	int c_arg_index=index;
	BT_QUANTIZED_BVH_NODE const * c_out = c_this->get_node_pointer(c_arg_index);
	BT_QUANTIZED_BVH_NODE* wrap_out = (BT_QUANTIZED_BVH_NODE*)(void*)(c_out);
	return wrap_out;
}

int bullet_btQuantizedBvhTree_getEscapeNodeIndex(btQuantizedBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getEscapeNodeIndex(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btQuantizedBvhTree_getLeftNode(btQuantizedBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getLeftNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btQuantizedBvhTree_getNodeBound(btQuantizedBvhTree* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB& c_arg_bound=(btAABB&)(*bound);
	c_this->getNodeBound(c_arg_nodeindex,c_arg_bound);
}

int bullet_btQuantizedBvhTree_getNodeCount(btQuantizedBvhTree* c_this){
	int c_out = c_this->getNodeCount();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btQuantizedBvhTree_getNodeData(btQuantizedBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getNodeData(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btQuantizedBvhTree_getRightNode(btQuantizedBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getRightNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btQuantizedBvhTree_isLeafNode(btQuantizedBvhTree* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	bool c_out = c_this->isLeafNode(c_arg_nodeindex);
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btQuantizedBvhTree_quantizePoint(btQuantizedBvhTree* c_this,unsigned short* quantizedpoint,btVector3* point){
	unsigned short * c_arg_quantizedpoint=(unsigned short *)(void*)(quantizedpoint);
	btVector3 const& c_arg_point=(btVector3 const&)(*point);
	c_this->quantizePoint(c_arg_quantizedpoint,c_arg_point);
}

void bullet_btQuantizedBvhTree_setNodeBound(btQuantizedBvhTree* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB const& c_arg_bound=(btAABB const&)(*bound);
	c_this->setNodeBound(c_arg_nodeindex,c_arg_bound);
}

bool bullet_btQuantizedBvhTree_testQuantizedBoxOverlapp(btQuantizedBvhTree* c_this,int node_index,unsigned short* quantizedMin,unsigned short* quantizedMax){
	int c_arg_node_index=node_index;
	unsigned short * c_arg_quantizedMin=(unsigned short *)(void*)(quantizedMin);
	unsigned short * c_arg_quantizedMax=(unsigned short *)(void*)(quantizedMax);
	bool c_out = c_this->testQuantizedBoxOverlapp(c_arg_node_index,c_arg_quantizedMin,c_arg_quantizedMax);
	bool wrap_out = (c_out);
	return wrap_out;
}

btGImpactQuantizedBvh* bullet_NewbtGImpactQuantizedBvh(){
	btGImpactQuantizedBvh* wrap_out = new btGImpactQuantizedBvh();
	return wrap_out;
}

btGImpactQuantizedBvh* bullet_NewbtGImpactQuantizedBvh1(btPrimitiveManagerBase* primitive_manager){
	btPrimitiveManagerBase * c_arg_primitive_manager=(btPrimitiveManagerBase *)(void*)(primitive_manager);
	btGImpactQuantizedBvh* wrap_out = new btGImpactQuantizedBvh(c_arg_primitive_manager);
	return wrap_out;
}

void bullet_btGImpactQuantizedBvh_buildSet(btGImpactQuantizedBvh* c_this){
	c_this->buildSet();
}

BT_QUANTIZED_BVH_NODE* bullet_btGImpactQuantizedBvh_get_node_pointer(btGImpactQuantizedBvh* c_this,int index){
	int c_arg_index=index;
	BT_QUANTIZED_BVH_NODE const * c_out = c_this->get_node_pointer(c_arg_index);
	BT_QUANTIZED_BVH_NODE* wrap_out = (BT_QUANTIZED_BVH_NODE*)(void*)(c_out);
	return wrap_out;
}

int bullet_btGImpactQuantizedBvh_getEscapeNodeIndex(btGImpactQuantizedBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getEscapeNodeIndex(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

btAABB* bullet_btGImpactQuantizedBvh_getGlobalBox(btGImpactQuantizedBvh* c_this){
	btAABB c_out = c_this->getGlobalBox();
	btAABB* wrap_out = new btAABB(c_out);
	return wrap_out;
}

int bullet_btGImpactQuantizedBvh_getLeftNode(btGImpactQuantizedBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getLeftNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactQuantizedBvh_getNodeBound(btGImpactQuantizedBvh* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB& c_arg_bound=(btAABB&)(*bound);
	c_this->getNodeBound(c_arg_nodeindex,c_arg_bound);
}

int bullet_btGImpactQuantizedBvh_getNodeCount(btGImpactQuantizedBvh* c_this){
	int c_out = c_this->getNodeCount();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btGImpactQuantizedBvh_getNodeData(btGImpactQuantizedBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getNodeData(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactQuantizedBvh_getNodeTriangle(btGImpactQuantizedBvh* c_this,int nodeindex,btPrimitiveTriangle* triangle){
	int c_arg_nodeindex=nodeindex;
	btPrimitiveTriangle& c_arg_triangle=(btPrimitiveTriangle&)(*triangle);
	c_this->getNodeTriangle(c_arg_nodeindex,c_arg_triangle);
}

int bullet_btGImpactQuantizedBvh_getRightNode(btGImpactQuantizedBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	int c_out = c_this->getRightNode(c_arg_nodeindex);
	int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGImpactQuantizedBvh_hasHierarchy(btGImpactQuantizedBvh* c_this){
	bool c_out = c_this->hasHierarchy();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGImpactQuantizedBvh_isLeafNode(btGImpactQuantizedBvh* c_this,int nodeindex){
	int c_arg_nodeindex=nodeindex;
	bool c_out = c_this->isLeafNode(c_arg_nodeindex);
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btGImpactQuantizedBvh_isTrimesh(btGImpactQuantizedBvh* c_this){
	bool c_out = c_this->isTrimesh();
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactQuantizedBvh_setNodeBound(btGImpactQuantizedBvh* c_this,int nodeindex,btAABB* bound){
	int c_arg_nodeindex=nodeindex;
	btAABB const& c_arg_bound=(btAABB const&)(*bound);
	c_this->setNodeBound(c_arg_nodeindex,c_arg_bound);
}

void bullet_btGImpactQuantizedBvh_setPrimitiveManager(btGImpactQuantizedBvh* c_this,btPrimitiveManagerBase* primitive_manager){
	btPrimitiveManagerBase * c_arg_primitive_manager=(btPrimitiveManagerBase *)(void*)(primitive_manager);
	c_this->setPrimitiveManager(c_arg_primitive_manager);
}

void bullet_btGImpactQuantizedBvh_update(btGImpactQuantizedBvh* c_this){
	c_this->update();
}

#ifdef __cplusplus
}
#endif
